home *** CD-ROM | disk | FTP | other *** search
/ Apple Reference & Presentation Library 1993 Spring / ARPL-Spring-93-Partner-Edition.iso / Applications / Spreadsheets / Claris Resolve Demo / Resolve Samples / External Examples / ResolveTools.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-07-17  |  1.3 KB  |  57 lines  |  [TEXT/MPS ]

  1. /*
  2.     ResolveTools.h
  3.     
  4.     C Include file for building Claris® Resolve™ external tools
  5.  
  6.     MPW-compatible declarations are assumed
  7.     use #define ThinkC for Think C compatibility
  8. */
  9.  
  10. #ifndef numfuncs
  11.     #define numfuncs    1
  12. #endif
  13.  
  14. typedef struct _RELT                        /*    Routine list element            */
  15.     {
  16. #ifdef ThinkC
  17.     ProcPtr        pfunc;                    /*    Pointer to routine            */
  18. #else
  19.     void        (*pfunc)(PVAL, PVAL);    /*    Pointer to routine            */
  20. #endif
  21.     char        *name;                        /*    Routine name                    */
  22.     short        narg;                            /*    Number of arguments            */
  23.     } RELT, *PRELT;
  24.  
  25. typedef struct _ROUT                        /*    Routine list                    */
  26.     {
  27.     short        nrout;                        /*    Number of routines            */
  28. #ifdef ThinkC
  29.     ProcPtr        exitfunc;                /*    Func pntr to exit routine    */
  30. #else
  31.     void        (*exitfunc)();                /*    Func pntr to exit routine    */
  32. #endif
  33.     RELT        relts[numfuncs];            /*    Func pntr to routine            */
  34.     } ROUT, *PROUT;
  35.  
  36. /* flag values for arguments and returns    */
  37. #define    NUMERIC        0
  38. #define    STRING        1
  39. #define    ERR            2
  40.  
  41. typedef struct _val
  42.     {
  43.     union
  44.         {
  45. #ifdef ThinkC
  46.         short double    numeric;            /* numeric argument or return    */
  47. #else
  48.         double            numeric;            /* numeric argument or return    */
  49. #endif
  50.         char                *string;            /* text argument or return        */
  51.         short                err;                /* error argument or return    */
  52.         unsigned long    private[3];        /* private Resolve™ information    */
  53.         } val;
  54.  
  55.     short        flag;                    /* type of argument or return    */
  56.     } VAL, *PVAL;
  57.